﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace SmartConference.Infrastructure.Migrations
{
    public partial class 权限实体 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "DataDescription",
                table: "PermissionInfo");

            migrationBuilder.RenameColumn(
                name: "OperationDescription",
                table: "PermissionInfo",
                newName: "PermissionNameDesc");

            migrationBuilder.RenameColumn(
                name: "FieldDescription",
                table: "PermissionInfo",
                newName: "PermissionName");

            migrationBuilder.UpdateData(
                table: "UserInfo",
                keyColumn: "IDNumber",
                keyValue: 1L,
                column: "Birthday",
                value: new DateTime(2025, 6, 6, 21, 1, 41, 624, DateTimeKind.Local).AddTicks(5743));
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.RenameColumn(
                name: "PermissionNameDesc",
                table: "PermissionInfo",
                newName: "OperationDescription");

            migrationBuilder.RenameColumn(
                name: "PermissionName",
                table: "PermissionInfo",
                newName: "FieldDescription");

            migrationBuilder.AddColumn<string>(
                name: "DataDescription",
                table: "PermissionInfo",
                type: "nvarchar(200)",
                maxLength: 200,
                nullable: false,
                defaultValue: "");

            migrationBuilder.UpdateData(
                table: "UserInfo",
                keyColumn: "IDNumber",
                keyValue: 1L,
                column: "Birthday",
                value: new DateTime(2025, 6, 6, 8, 31, 44, 278, DateTimeKind.Local).AddTicks(8523));
        }
    }
}
